﻿namespace OneWorks.DataBase.Entity
{
    using System;
    using System.Collections.Generic;
    using System.Text;
    using OneWorks.Metadata.Interface;

    public partial class Menu : IAggregateRoot
    {
        public Menu()
        {   
            ParentMenus = new List<Menu>();
            ChildMenuRelations = new List<MenuRelation>();
            ParentMenuRelations = new List<MenuRelation>();
        }

        public System.Guid ID { get; set; }
        public string Name { get; set; }
        public int Type { get; set; }
        public string Url { get; set; }
        public string Target { get; set; }
        public bool DelFlag { get; set; }
        public bool Enable { get; set; }
        public System.Guid? IconID { get; set; }
        public long CreateDate { get; set; }
        public int Depth { get; set; }
        public System.Guid ParentID { get; set; }
        public bool IsSys { get; set; }
        public System.Guid UserID { get; set; }

        public virtual Icon Icon { get; set; }
        public virtual Menu ParentMenu { get; set; }
        public virtual ICollection<Menu> ParentMenus { get; set; }
        public virtual User User { get; set; }
        public virtual ICollection<MenuRelation> ChildMenuRelations { get; set; }
        public virtual ICollection<MenuRelation> ParentMenuRelations { get; set; }
    }
}